#pragma once
#include "stdafx.h"

using namespace std;

enum tokenType { KEYWORD, SYMBOL, IDENTIFIER, INT_CONST, STRING_CONST , OTHER}; // TBD not needed

class JackTokenizer
{
private:
	fstream infile;
	string tokenizedFile;
	string currentToken;
	int tokenptr;
	bool bhasMoreTokens;

public:
	JackTokenizer(char* filename);
	~JackTokenizer();
	void tokenize();
	tokenType tokenType();
	int intVal();
	bool hasMoreTokens();
	string advance();
	string getTokenizedFile();
	void eraseNextSpace(string curren);
	void setTokenPtr(int ptr) {tokenptr = ptr;}
	int getTokenPtr() {return tokenptr;}
	void setCurrentToken(string token) {currentToken = token;}
	string getCurrentToken() {return currentToken;}
};

